<?php 
namespace app\common\model;
class AuthGroup extends Common{
	protected $insert = ['type'=>1, 'addtime'=>SYS_TIME,'module'=>'admin'];
    //为1正常，为0禁用,-1为删除
    protected function getStatusnameAttr($value, $data){
    	$arr = [-1=>'删除', 0=>'正常', 1=>'禁用'];
    	return $arr[$data['status']];
    }
    protected function getAddtimeAttr($value, $data){
    	return date('Y-m-d H:i:s', $value);
    }
    protected function getAlldataAttr($value, $data){
		$arr = [-1=>'删除', 0=>'正常', 1=>'禁用'];
		$data['statusname'] = $arr[$data['status']];
		$data['addtime'] = date('Y-m-d H:i:s', $data['addtime']);
		return $data;
	}
}